<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改处理跟踪</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	name="disposalTrack";
	function changeType(value){
		var type = document.form1.disposalTrackType;
		var money = document.form1.disposalTrackMoney;
		if(value == "2"){
			for(var i = 0; i < type.length; i ++){
				type[i].disabled = false;
			}
			if(type[1].checked == true){
				money.disabled = false;
			}
		}else{
			for(var i = 0; i < type.length; i ++){
				type[i].disabled = true;
			}
			money.disabled = true;
		}
		return false;
	}
	function changeMoney(value){
		var money = document.form1.disposalTrackMoney;
		if(value == "1"){
			money.disabled = false;
		}else{
			money.disabled = true;
		}
		return false;
	}
	function check(){
		var type = document.form1.disposalTrackType;
		var money = document.form1.disposalTrackMoney;
		if(type[1].disabled == false && type[1].checked == true){
			if(money.value == ""){
				alert("请输入罚款金额！");
				money.focus();
				return false;
			}
			if(money.value.search("^-?\\d+(\\.\\d+)?$")!=0){
				alert("罚款金额只能为数字！");
				money.focus();
				return false;
			}
		}
	}
</script>
</head>

<body>
<form name="form1" action="<%=request.getContextPath()%>/DisposalTrack.do?method=updateDisposalTrack" method="post" onsubmit="return check()" target="disposalTrack">
<input type="hidden" value="${param.did}" name="did">
<table width="100%">
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>处理方式：</p>
    </td>
    <td width="75%" align="left">
    <input type="radio" name="disposalTrackWay" value="0" onclick="changeType(this.value)" <c:if test="${dt.disposalTrackWay=='0'}">checked</c:if>/>责令整改
    <input type="radio" name="disposalTrackWay" value="1" onclick="changeType(this.value)" <c:if test="${dt.disposalTrackWay=='1'}">checked</c:if>/>行政处理
    <input type="radio" name="disposalTrackWay" value="2" onclick="changeType(this.value)" <c:if test="${dt.disposalTrackWay=='2'}">checked</c:if>/>行政处罚
    &nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>处罚分类：</p>
    </td>
    <td width="75%" align="left" >
    <input type="radio" name="disposalTrackType" value="0" onclick="changeMoney(this.value)" <c:if test="${dt.disposalTrackType=='0'}">checked</c:if> <c:if test="${dt.disposalTrackWay!='2'}">disabled checked</c:if>/>警告
    <input type="radio" name="disposalTrackType" value="1" onclick="changeMoney(this.value)" <c:if test="${dt.disposalTrackType=='1'}">checked</c:if> <c:if test="${dt.disposalTrackWay!='2'}">disabled</c:if>/>罚款
    <input type="radio" name="disposalTrackType" value="2" onclick="changeMoney(this.value)" <c:if test="${dt.disposalTrackType=='2'}">checked</c:if> <c:if test="${dt.disposalTrackWay!='2'}">disabled</c:if>/>其他行政处罚
    &nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>罚款金额：</p>
    </td>
    <td width="75%" align="left" ><input type="text" name="disposalTrackMoney" value="${dt.disposalTrackMoney}" maxlength="32" <c:if test="${dt.disposalTrackWay!='2'||dt.disposalTrackType!='1'}">disabled</c:if>/>&nbsp;</td>
  </tr>
  <tr>
    <td width="25%" align="right" class="bg_blue"><p>补充执行方式：</p>
    </td>
    <td width="75%" align="left" >
    <input type="radio" name="disposalTrackPerformWay" value="0" <c:if test="${dt.disposalTrackPerformWay=='0'}">checked</c:if>/>正常执行
    <input type="radio" name="disposalTrackPerformWay" value="1" <c:if test="${dt.disposalTrackPerformWay=='1'}">checked</c:if>/>强制执行
    <input type="radio" name="disposalTrackPerformWay" value="2" <c:if test="${dt.disposalTrackPerformWay=='2'}">checked</c:if>/>行政复议
    <input type="radio" name="disposalTrackPerformWay" value="3" <c:if test="${dt.disposalTrackPerformWay=='3'}">checked</c:if>/>行政诉讼
    &nbsp;</td>
  </tr>
  <tr>
    <td class="nohover" colspan="2" align="center"><input class="buttonsubmit" type="submit" value="提交">&nbsp;<input class="buttonreset" type="reset" value="重置"> <input class="buttonnormal" type="button" value="关闭" onClick="javascript:window.close()"></td>
  </tr>
</table>
</form>
</body>
</html>
